<?php
require_once MODEL_PATH.DS.'News.php';
$News = new News();
$news_id = isset($_GET['news_id'])?(int)$_GET['news_id']:'';
$category_list = $News->getAllNewsCate();
if($news_id){
	$news_info = $News->getNewsById($news_id);	
}

$tpl->assign('category_list',$category_list);
$tpl->assign('news_info',$news_info);

$tpl->display('news_view.tpl');
?>